class @AdminSecurityRoutes extends Backbone.Router
    routes:
        "Security/LogOn*path": "LogOn"
        "Security/LogOff": "LogOff"

    LogOn: ->
        model = new AdminSecurityModel()
        model.set("ReturnUrl", Url.GetParameterByName("ReturnUrl"))
        view = new AdminSecurityView({ model: model })

    LogOff: ->
        Loading.Start()       
        view = new WelcomeView({model:new WelcomeModel()})
        url = SiteMap.Admin.Security.LogOn
        view.render()
        $.ajax(           
            url: SiteMap.Admin.Security.LogOff
            success: () ->
                view.Navigate(url, true)
        )
